﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Data;
using System.Collections;
using System.Windows.Controls.Primitives;

namespace MyPublisher.Windows.Controls
{
    public class SimpleToolBar : ToolBar
    {
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            ToggleButton toggleButton = GetTemplateChild("OverflowButton") as ToggleButton;
            if (toggleButton != null)
            {
                toggleButton.Visibility = System.Windows.Visibility.Collapsed;
            }
        }
    }
}
